Administrator Guide 2017
Concepts - Display conditions

Display conditions are a way of including or excluding information dependent of certain factors.

The standard format for a condition is:

conditionType;uniqueName(or attribute or id);testType;valueToTest

These factors might be triggered by information entered by a user on a device (set up in the template) or by office staff on the server (set up in the job definition).

They might also be 'hardcoded' with a condition that will never be true so that a piece of information can be held on the device without cluttering up the screen. A typical example might be when a URL or document needs to be accessed by a device user but the details of where it is stored are unnecessary and would only confuse or clutter up the screen if shown. A way to implement this would be by entering the following which will never be true.

resultValue;xxx;equals;999

Another example might be to only show a particular section or item on a device depending on an answer to a previous question. For instance, a tick box with a unique name of 'vehicleDamageYesNo' and a question of 'Is there any damage to the vehicle?' might trigger a section to be displayed so that further details can be entered.  The display condition for the section would look like this:

resultValue;vehicleDamageYesNo;equals;yes

conditionType

               
  • resultValue – test the result of (ie data entered in) an item on the form.  Refers to Id.  Also rV for short entry areas
  • resultValueX - test the result of (ie data entered in) an item on the form.  Refers to Text. Also rVX for short entry areas
  • workOrderValue – test the value of an item in the associated job sent from the server
  • workOrderRowCount -
  • customerAttribute – test for an attribute of the current customer
  • locationAttribute – test for an attribute of the current location
  • listItemAttribute – test for an attribute of a list-based answer on the form
  • buttonSequences – test for whether a sequence of action buttons on the form have been activated
  • resultValueDayOfWeek -
  • sectionResultValue -
  • hasJob – test for whether the current form is associated with a job
  • showHelp
  • multiResultValue - test for several results at the same time, for example whether the answer 'yes' has been given to any of several questions.  This might appear as multiResultValue;question1,question2,question3;equals;12345 where 12345 is the id for 'yes' in a list.
  • multiResultValueX - test for a particular text appearing in one of several results, for example whether the word 'fail' appears in a Text item, a multiple choide item or a drop-down list.  This might appear as multiResultValueX;question1,question2,question3;contains;fail or it might be multiResultValueX;question1,question2,question3;notcontains;pass

Only evaluated on the server ie after the form has been sent back to the office

  • hasFollowUp – test for whether the current form has associated follow-up actions
  • hasOutstandingFollowUp – test for whether the current form has outstanding follow-up actions
  • substituteValue or sV - used to test for a value which needs to be calculated such as the value of a template item or customer id

uniqueName(or attribute or id)

This refers to the thing that is to be evaluated, whether in the template or in the job definition.  It might be the unique name, an internal id or an attribute (see Concepts - Attributes for more details).

Be aware of the following:
  • Device-side tests on list entries use the list entry id, whilst the server-side uses the list entry text.  This has been somewhat superseded by the use of rvX etc.
  • Attributes are either standard or bespoke.
  • Unique names are case sensitive so make sure the capitals are in the right place.
  • Special items:
    • %CUSTOMER_EXTERNALPK% tests agains the Customer externalPK

testType

This is the type of test you’re doing. You can use:
  • equals – test for a specific value
  • lowerequals - removes case sensitivity for matching
  • notequals – test for the value not being the specified one
  • lowernotequals - removes case sensitivity for matching
  • gt - greater than
  • gte - greater than or equals
  • lt - less than
  • lte - less than or equals
  • empty – test for whether no value is present
  • notempty – test for whether any value is present
  • isoneof – test for a number of values (separate each value with a comma)
  • morethanxdaysagoorempty – test whether a date item has a value more than the specified number of days ago (or it’s empty)
  • complete – test whether a sequence of action buttons has been fully completed
  • incomplete – test whether a sequence of action buttons is incomplete
  • contains - test for partial match
  • notcontains - test for partial non-match
  • like - partial match

valueToTest

This is the answer to test against.
  • For a tick/checkbox it needs to be Yes or No
  • For text-based answers it’s just the text
  • For list-based answers on the device, use the internal Id of that list entry
  • For list-based answers on the server, use the text of the list entry
See Also